<template>
    <el-table :data="tableData" border style="width: 100%">
        <template v-for="(col, index) in propList.tColumnConfig">
            <!-- 普通列 -->
            <el-table-column :prop="col.prop" :label="col.label" width="100" :key="index" v-if="!col.isSlot" />
           
           <!-- 插槽列 -->
            <el-table-column :label="col.label" v-else>
                <template #default="scope">
                    <slot :name="col.prop" :row="scope.row" :index="scope.$index" :column="col" />
                </template>

            </el-table-column>
        </template>
    </el-table>
</template>


<script lang="ts" setup>
import { onMounted, ref } from 'vue'

const props = defineProps(['propList', 'mockData', 'slotName'])
const propList = props.propList

const tableData = ref([]);


onMounted(() => {
    tableData.value = props.mockData.value;
})


</script>
